package com.authine.cloudpivot.engine.api.facade;

import io.swagger.v3.oas.annotations.Operation;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import java.math.BigDecimal;
import java.util.*;

/**
 * @description:
 * @author: zyj
 * @time: 2021/6/17 17:44
 */
@Path("/api/v1/taskReport")
public interface TaskReportFacade extends Versionable {

    @Path("/getXiaFaDataLejuan")
    @GET
    @Operation(summary = "乐卷项目任务统计", method = "GET")
    Boolean getXiaFaDataLejuan();

    @Path("/getProjects")
    @GET
    @Operation(summary = "获取项目", method = "GET")
    String getProjects();

    @Path("/moveSubject")
    @GET
    @Operation(summary = "项目移交", method = "GET")
    Boolean moveSubject(String oldUserId,String newUserId,String subjectId);

    @Path("/createZiJianQCReport")
    @GET
    @Operation(summary = "qc自建项目统计", method = "GET")
    Boolean createZiJianQCReport();

    @Path("/updateSampleList")
    @GET
    @Operation(summary = "修改样本数据", method = "GET")
    Boolean updateSampleList();

    @Path("/updateStoreState")
    @GET
    @Operation(summary = "更新招聘需求提报子表中门店状态", method = "GET")
    Boolean updateStoreState(String recruitmentId, String state);

    @Path("/delOffLineReport")
    @GET
    @Operation(summary = "删除当前时间之后的线下周报", method = "GET")
    Boolean delOffLineReport(Date currentTime, String recuitmentId);

    @Path("/delOnLineReport")
    @GET
    @Operation(summary = "删除当前时间之后的线上周报", method = "GET")
    Boolean delOnLineReport(Date currentTime, String recuitmentId);

    @Path("/updateDemandFor")
    @GET
    @Operation(summary = "更新招聘需求数", method = "GET")
    void updateDemandFor(String recruitmentType, String idCode, BigDecimal demandFor, String storeContacts, String contactsPhone, String comment);

    @Path("/updateRecruitmentState")
    @GET
    @Operation(summary = "更新招聘需求状态", method = "GET")
    void updateRecruitmentState(String id, String state);

    @Path("/hasRole")
    @GET
    @Operation(summary = "用户是否是有该角色权限", method = "GET")
    boolean hasRole(String userId, String roleId);

    @Path("/updateOnlineReportInfo")
    @GET
    @Operation(summary = "更新线上周报信息", method = "GET")
    void updateOnlineReportInfo(double onlineRecruitmentNum, double projectProvideNum, String comment, String id);

    @Path("/updateOffLineReport")
    @GET
    @Operation(summary = "更新线下周报信息", method = "GET")
    void updateOffLineReport(double plannedNum, double finishedNum, double recommendNum,  String councilor, String comment, String resubmisPerson, String id);

    @Path("/updateOffLineReportInfo")
    @GET
    @Operation(summary = "更新线下周报信息", method = "GET")
    void updateOffLineReportInfo(double mgFinishedNum, double clientProvideNum, double projectProvideNum, String id);

    @Path("/getRecruitmentIds")
    @GET
    @Operation(summary = "获取招聘周报d", method = "GET")
    List<String> getRecruitmentIds(List<String> idList, String recruitWay);

    @Path("/updateReportMgrInfo")
    @GET
    @Operation(summary = "更新周报管理信息", method = "GET")
    void updateReportMgrInfo(String recuitmentId,String recruitWa,boolean isNeedExecute);


    @Path("/getReportCreateTimeList")
    @GET
    @Operation(summary = "获取所有招聘周报的创建时间", method = "GET")
    ArrayList<Object[]> getReportCreateTimeList(String recuitmentId, String recruitWay);

    @Path("/delWeeklyReport")
    @GET
    @Operation(summary = "根据id删除周报", method = "GET")
    void delWeeklyReport(List<String> delIds, String recruitWay);


    @Path("/updateWeeklyReportInfo")
    @GET
    @Operation(summary = "更新未归档的招聘周报的需求数和完成时间", method = "GET")
    void updateWeeklyReportInfo(String recruitmentId, Date needFinishTime, String recruitWay);

    @Path("/updateWeeklyReportInfo")
    @GET
    @Operation(summary = "更新招聘管理数据的总需求数和完成时间", method = "GET")
    void updateWeeklyReportMgrInfo(String recruitmentId, Date needFinishTime, String recruitWay, String recruitmentType);

    @Path("/autoReviewReportMgrInfo")
    @GET
    @Operation(summary = "自动复核周报管理信息", method = "GET")
    void autoReviewReportMgrInfo();

    @Path("/delReportInfoByICode")
    @GET
    @Operation(summary = "根据idCode删除本周末以后的周报", method = "GET")
    void delReportInfoByICode(String recruitWay, List<String> idCodes, Date nextMonday);

    @Path("/updateRCSArea")
    @GET
    @Operation(summary = "更新rcs区域", method = "GET")
    void updateRCSArea(String id, String schemaCode);

    @Path("/updateExecuteDetail")
    @GET
    @Operation(summary = "更新执行需求中的明细", method = "GET")
    void updateExecuteDetail(String executeDetailId, BigDecimal newStoreNum, BigDecimal newPlanGearsNum, BigDecimal newPlanRoundNum);

    @Path("/updateExecuteReportInfo")
    @GET
    @Operation(summary = "更新执行周报", method = "GET")
    void updateExecuteReportInfo(String executeDetailId, BigDecimal newStoreNum, BigDecimal newPlanGearsNum, BigDecimal newPlanRoundNum);

    @Path("/updateExecuteReportTime")
    @GET
    @Operation(summary = "更新执行周报的时间", method = "GET")
    void updateExecuteReportTime(String executeId, Date oldWeekTime, Date newWeekTime);

    @Path("/updateExecuteMgrInfo")
    @GET
    @Operation(summary = "更新执行周报管理信息", method = "GET")
    void updateExecuteMgrInfo(String executeId, Date activityStartTime, Date activityEndTime);

    @Path("/delExecuteReport")
    @GET
    @Operation(summary = "删除执行周报", method = "GET")
    void delExecuteReport(List<String> executeIds);

    @Path("/updateExecuteReportEndTime")
    @GET
    @Operation(summary = "更新执行周报的结束时间", method = "GET")
    void updateExecuteReportEndTime(String executeDemandId, Date activityEndTime);

    @Path("/createExecuteDetail")
    @GET
    @Operation(summary = "新建执行明细", method = "GET")
    void createExecuteDetail(Map<String, Object> data);

    @Path("/getExecuteDemandIds")
    @GET
    @Operation(summary = "获取执行周报关联执行的需求id", method = "GET")
    List<String> getExecuteDemandIds(List<String> idList);


    @Path("/updateDetailState")
    @GET
    @Operation(summary = "更新执行需求明细状态", method = "GET")
    void updateDetailState(String demandId, String year, String month, String cycle,String state);


    @Path("/updateExecuteCreateReportTime")
    @GET
    @Operation(summary = "更新执行周报时间", method = "GET")
    void updateExecuteCreateReportTime(String demandId, String year, String month, String cycle, Date reportCreateTime);

    @Path("/updateExecuteDemandEndTime")
    @GET
    @Operation(summary = "更新执行需求结束时间", method = "GET")
    void updateExecuteDemandEndTime(String demandId, Date activityEndTime);

    @Path("/updateExecuteReportByOp")
    @GET
    @Operation(summary = "执行经理更新执行周报", method = "GET")
    void updateExecuteReportByOp(double actualGearsNum, double actualRoundNum, String councilor, String remark, String resubmisPerson, String id,double reasonNum,String arePersons);

    @Path("/updateExecuteReportByPM")
    @GET
    @Operation(summary = "项目经理更新执行周报", method = "GET")
    void updateExecuteReportByPM(double mgGearsNum, double mgRoundNum, double projectProvideNum, double clientProvideNum,  String id);

    @Path("/updateExecuteReportMgr")
    @GET
    @Operation(summary = "更新执行周报管理信息", method = "GET")
    void updateExecuteReportMgr(Set<String> demandIdSet,boolean isNeedExecute);

    @Path("/updateReportCreateTime")
    @GET
    @Operation(summary = "更新执行周报管理信息", method = "GET")
    void updateReportCreateTime(String executeDemandId, List<String> cycleList, List<String> weeklyReportDayList);

    @Path("/updateDemandDetailStatus")
    @GET
    @Operation(summary = "更新招聘需求和执行需求明细状态", method = "GET")
    void updateDemandDetailStatus();

    @Path("/delStoreByExecuteId")
    @GET
    @Operation(summary = "根据执行id删除门店", method = "GET")
    void delStoreByExecuteId(String executeId);

    @Path("/updateRCSAreaByExecuteId")
    @GET
    @Operation(summary = "更新门店的rcs大区", method = "GET")
    void updateRCSAreaByExecuteId(String executeId);

    @Path("/updateAttrStatusByExecuteId")
    @GET
    @Operation(summary = "更新门店的文件上传状态", method = "GET")
    void updateAttrStatusByExecuteId(String executeId);

    @Path("/updatePM")
    @GET
    @Operation(summary = "变更项目经理", method = "GET")
    void updatePM(String originalPMId, String originalPMDeptId, String PMId, String PMDeptId, String projectName, String subjectName);

    @Path("/updateEM")
    @GET
    @Operation(summary = "变更执行经理", method = "GET")
    void updateEM(Map<String, Object> data);

    @Path("/getCalculateNum")
    @GET
    @Operation(summary = "获取计算后的数量", method = "GET")
    List<Map<String, Object>> getCalculateNum(HashMap<String, Set<String>> demandIdMap, String recruitWay);

    @Path("/autoCloseDemand")
    @GET
    @Operation(summary = "自动关闭需求", method = "GET")
    void autoCloseDemand();

    @Path("/autoCommitReport")
    @GET
    @Operation(summary = "自动提交周报", method = "GET")
    void autoCommitReport();

    @Path("/autoReviewReport")
    @GET
    @Operation(summary = "自动复核周报", method = "GET")
    void autoReviewReport(String type);

    @Path("/autoArchiveReport")
    @GET
    @Operation(summary = "自动归档周报", method = "GET")
    void autoArchiveReport(String type);

    @Path("/getUncommittedReportTips")
    @GET
    @Operation(summary = "未提交周报提醒", method = "GET")
    Map<String, String> getUncommittedReportTips();

    @Path("/getUnReviewedReportTips")
    @GET
    @Operation(summary = "未复核周报提醒", method = "GET")
    Map<String, String> getUnReviewedReportTips(String type);

    @Path("/getUnReviewedReportTips")
    @GET
    @Operation(summary = "补齐周报提醒", method = "GET")
    Map<String, String> getUnArchivedReportTips(String type);

    @Path("/getNoContractProject")
    @GET
    @Operation(summary = "获取无合同的项目", method = "GET")
    List<Map<String, Object>> getNoContractProject(int startDays, int endDays);

    @Path("/getDemandInfo")
    @GET
    @Operation(summary = "获取需求信息", method = "GET")
    Map<String, String> getDemandInfo(String demandId, String subSchemaCode);

    @Path("/getProjectDirector")
    @GET
    @Operation(summary = "获取项目总监id", method = "GET")
    String getProjectDirector(String userId, String projectDirectorRoleId);

    @Path("/traceRecruitment")
    @GET
    @Operation(summary = "获取即将到期的招聘需求", method = "GET")
    List<Map<String, Object>> traceRecruitment(int days);

    @Path("/updateStoreInfo")
    @GET
    @Operation(summary = "更新门店信息", method = "GET")
    void updateStoreInfo(String demandId, String subjectName, List<Map<String, Object>> containsStores, String updateStoreInfo);

    @Path("/createRecruitmentDetail")
    @GET
    @Operation(summary = "新建招聘明细", method = "GET")
    void createRecruitmentDetail(Map<String, Object> data);

    @Path("/updateRecruitmentDetailStatus")
    @GET
    @Operation(summary = "根据idCode更新招聘提报子表的门店状态", method = "GET")
    void updateRecruitmentDetailStatus(List<String> idCodes, String state);

    @Path("/updateDetailStoreState")
    @GET
    @Operation(summary = "根据门店信息状态更新招聘提报子表的门店状态", method = "GET")
    void updateDetailStoreState(List<String> demandIds, String customerStoreNum, String state);

    @Path("/updateDemandForById")
    @GET
    @Operation(summary = "根据id更新需求数", method = "GET")
    void updateDemandForById(String demandId,String recruitWay);

    @Path("/updateStoreRCSArea")
    @GET
    @Operation(summary = "更新rcs区域", method = "GET")
    void updateStoreRCSArea(String subjectName);

    @Path("/updateZPDetail")
    @GET
    @Operation(summary = "更新招聘门店信息", method = "GET")
    void updateZPDetail(List<String> demandIds, String storeShortName, String rcsArea, String province, String cityName, String district, String detailArea, String area, String storeOutlet, String customDockingPerson, String customLinkType, String cityLevel,String customerStoreNum);

    @Path("/updateDJDetail")
    @GET
    @Operation(summary = "更新店检门店信息", method = "GET")
    void updateDJDetail(List<String> demandIds, String storeShortName, String province, String cityName, String district, String detailArea, String area, String storeOutlet, String customDockingPerson, String customLinkType, String cityLevel,String customerStoreNum);

    @Path("/clearFASQ")
    @GET
    @Operation(summary = "清空商圈", method = "GET")
    void clearFASQ(String id);
}